package star.cloud.asme.person.ndePersonCertification;

import com.baomidou.mybatisplus.core.metadata.IPage;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import star.cloud.asme.base.dto.Result;
import star.cloud.asme.base.mybatis.IBaseController;

import java.util.List;

@RestController
@RequestMapping("/person/ndePersonCertification")
@RequiredArgsConstructor
public class NdePersonCertificationController implements IBaseController<NdePersonCertification> {

    private final NdePersonCertificationService ndePersonCertificationService;

    @Override
    public Result<NdePersonCertification> getOneByCondition(String columnName, Object columnValue) {
        return ndePersonCertificationService.getOneByCondition(columnName, columnValue);
    }

    @Override
    public Result<List<NdePersonCertification>> getListByCondition(String columnName, Object columnValue) {
        return ndePersonCertificationService.getListByCondition(columnName, columnValue);
    }

    @Override
    public Result<List<NdePersonCertification>> getListByConditions(NdePersonCertification conditions) {
        return ndePersonCertificationService.getListByConditions(conditions);
    }

    @Override
    public Result<IPage<NdePersonCertification>> getListByConditionsWithPage(NdePersonCertification conditions) {
        return ndePersonCertificationService.getListByConditionsWithPage(conditions);
    }

    @Override
    public Result<NdePersonCertification> insertOne(NdePersonCertification entity) {
        return ndePersonCertificationService.insertOne(entity);
    }

    @Override
    public Result<NdePersonCertification> updateOne(NdePersonCertification entity) {
        return ndePersonCertificationService.updateOne(entity);
    }

    @Override
    public Result<?> logicalDeleteById(Long id) {
        return ndePersonCertificationService.logicalDeleteById(id);
    }

    @Override
    public Result<?> activeById(Long id) {
        return ndePersonCertificationService.activeById(id);
    }
}
